<?php

class Admin_Form_Fullonsms extends Zend_Form {

    public function init() {
        $this->setMethod("post");

        $username = new Zend_Form_Element_Text('username');
        $username->setLabel("Enter Username:")
                ->setRequired()
                ->addFilter("StringTrim")
                ->addValidator('regex', false, array('/^[0-9 ]+$/'))
                ->setAttribs(array('class' => 'span12', 'placeholder' => 'Generally this is mobile number for FullOnSms'))
                ->addErrorMessages(array("Invalid mobile number"));

        $password = new Zend_Form_Element_Text('password');
        $password->setLabel("Enter Password:")
                ->setRequired()
                ->addFilter('StringTrim')
                ->setAttribs(array('placeholder' => 'FullOnSms Password', 'class' => 'span12'));

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel("Update Details")
                ->setAttribs(array('class' => 'btn btn-success'));

        $this->addElements(array($username, $password, $submit));
    }

}

